<?php

namespace App\Models\OpenShop\Common;

use App\Models\BaseModel;
use App\Models\Traits\KfSoftDeletes;

class OpenShopUserTaskTargetModel extends BaseModel
{
    use KfSoftDeletes;

    protected $table = 'open_shop_user_task_target';

    protected $fillable = [
        'userId',
        'targetTime',
        'type',
        'targetCount',
        'finishCount',
        'createdAt',
        'createdByUid',
        'updatedAt',
        'updatedByUid',
        'isDeleted',
    ];
    const TYPE_0 = 0;
    const TYPE_1 = 1;

    const TYPE_TEXT_MAPPING = [
        self::TYPE_0 => "督导",
        self::TYPE_1 => "选址"
    ];

    public static function insertData(array $data): bool
    {
        return self::query()->insert($data);
    }

}
